package com.baizhi.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

public class CmfzUser implements Serializable {
    private Integer userId;

    private String userTelphone;

    private String userPassword;

    private String userImage;

    private String userNickname;

    private String userName;

    private String userSex;

    private String userAutograph;

    private String userProvince;

    private String userCity;

    private Integer guruId;

    private Integer userStatus;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date userCreateDate;

    private CmfzGuru cmfzGuru;

    private static final long serialVersionUID = 1L;

    public CmfzUser() {
    }

    public CmfzUser(Integer userId, String userTelphone, String userPassword, String userImage, String userNickname, String userName, String userSex, String userAutograph, String userProvince, String userCity, Integer guruId, Integer userStatus, Date userCreateDate) {
        this.userId = userId;
        this.userTelphone = userTelphone;
        this.userPassword = userPassword;
        this.userImage = userImage;
        this.userNickname = userNickname;
        this.userName = userName;
        this.userSex = userSex;
        this.userAutograph = userAutograph;
        this.userProvince = userProvince;
        this.userCity = userCity;
        this.guruId = guruId;
        this.userStatus = userStatus;
        this.userCreateDate = userCreateDate;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUserTelphone() {
        return userTelphone;
    }

    public void setUserTelphone(String userTelphone) {
        this.userTelphone = userTelphone == null ? null : userTelphone.trim();
    }

    public String getUserPassword() {
        return userPassword;
    }

    public void setUserPassword(String userPassword) {
        this.userPassword = userPassword == null ? null : userPassword.trim();
    }

    public String getUserImage() {
        return userImage;
    }

    public void setUserImage(String userImage) {
        this.userImage = userImage == null ? null : userImage.trim();
    }

    public String getUserNickname() {
        return userNickname;
    }

    public void setUserNickname(String userNickname) {
        this.userNickname = userNickname == null ? null : userNickname.trim();
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName == null ? null : userName.trim();
    }

    public String getUserSex() {
        return userSex;
    }

    public void setUserSex(String userSex) {
        this.userSex = userSex == null ? null : userSex.trim();
    }

    public String getUserAutograph() {
        return userAutograph;
    }

    public void setUserAutograph(String userAutograph) {
        this.userAutograph = userAutograph == null ? null : userAutograph.trim();
    }

    public String getUserProvince() {
        return userProvince;
    }

    public void setUserProvince(String userProvince) {
        this.userProvince = userProvince == null ? null : userProvince.trim();
    }

    public String getUserCity() {
        return userCity;
    }

    public void setUserCity(String userCity) {
        this.userCity = userCity == null ? null : userCity.trim();
    }

    public Integer getGuruId() {
        return guruId;
    }

    public void setGuruId(Integer guruId) {
        this.guruId = guruId;
    }

    public Integer getUserStatus() {
        return userStatus;
    }

    public void setUserStatus(Integer userStatus) {
        this.userStatus = userStatus;
    }

    public Date getUserCreateDate() {
        return userCreateDate;
    }

    public void setUserCreateDate(Date userCreateDate) {
        this.userCreateDate = userCreateDate;
    }

    public CmfzGuru getCmfzGuru() {
        return cmfzGuru;
    }

    public void setCmfzGuru(CmfzGuru cmfzGuru) {
        this.cmfzGuru = cmfzGuru;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CmfzUser other = (CmfzUser) that;
        return (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getUserTelphone() == null ? other.getUserTelphone() == null : this.getUserTelphone().equals(other.getUserTelphone()))
            && (this.getUserPassword() == null ? other.getUserPassword() == null : this.getUserPassword().equals(other.getUserPassword()))
            && (this.getUserImage() == null ? other.getUserImage() == null : this.getUserImage().equals(other.getUserImage()))
            && (this.getUserNickname() == null ? other.getUserNickname() == null : this.getUserNickname().equals(other.getUserNickname()))
            && (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName()))
            && (this.getUserSex() == null ? other.getUserSex() == null : this.getUserSex().equals(other.getUserSex()))
            && (this.getUserAutograph() == null ? other.getUserAutograph() == null : this.getUserAutograph().equals(other.getUserAutograph()))
            && (this.getUserProvince() == null ? other.getUserProvince() == null : this.getUserProvince().equals(other.getUserProvince()))
            && (this.getUserCity() == null ? other.getUserCity() == null : this.getUserCity().equals(other.getUserCity()))
            && (this.getGuruId() == null ? other.getGuruId() == null : this.getGuruId().equals(other.getGuruId()))
            && (this.getUserStatus() == null ? other.getUserStatus() == null : this.getUserStatus().equals(other.getUserStatus()))
            && (this.getUserCreateDate() == null ? other.getUserCreateDate() == null : this.getUserCreateDate().equals(other.getUserCreateDate()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getUserTelphone() == null) ? 0 : getUserTelphone().hashCode());
        result = prime * result + ((getUserPassword() == null) ? 0 : getUserPassword().hashCode());
        result = prime * result + ((getUserImage() == null) ? 0 : getUserImage().hashCode());
        result = prime * result + ((getUserNickname() == null) ? 0 : getUserNickname().hashCode());
        result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode());
        result = prime * result + ((getUserSex() == null) ? 0 : getUserSex().hashCode());
        result = prime * result + ((getUserAutograph() == null) ? 0 : getUserAutograph().hashCode());
        result = prime * result + ((getUserProvince() == null) ? 0 : getUserProvince().hashCode());
        result = prime * result + ((getUserCity() == null) ? 0 : getUserCity().hashCode());
        result = prime * result + ((getGuruId() == null) ? 0 : getGuruId().hashCode());
        result = prime * result + ((getUserStatus() == null) ? 0 : getUserStatus().hashCode());
        result = prime * result + ((getUserCreateDate() == null) ? 0 : getUserCreateDate().hashCode());
        return result;
    }

    @Override
    public String toString() {
        return "CmfzUser{" +
                "userId=" + userId +
                ", userTelphone='" + userTelphone + '\'' +
                ", userPassword='" + userPassword + '\'' +
                ", userImage='" + userImage + '\'' +
                ", userNickname='" + userNickname + '\'' +
                ", userName='" + userName + '\'' +
                ", userSex='" + userSex + '\'' +
                ", userAutograph='" + userAutograph + '\'' +
                ", userProvince='" + userProvince + '\'' +
                ", userCity='" + userCity + '\'' +
                ", guruId=" + guruId +
                ", userStatus=" + userStatus +
                ", userCreateDate=" + userCreateDate +
                ", cmfzGuru=" + cmfzGuru +
                '}';
    }
}